<?php
/**
 * Created by PhpStorm.
 * User: zhongyb
 * Date: 2016/6/6
 * Time: 15:32
 */
namespace common\entities\common;

use common\entities\ConfigEntity;
use Yii;

/**
 * This is the model class for table "myscrm_erpservicetemplate".
 *
 * @property string $ERPServiceTemplateId
 * @property string $ServiceName
 * @property string $ServiceFriendlyName
 * @property string $OperationTypeId
 * @property string $AddressId
 * @property integer $ServiceCategory
 * @property string $BeginDatetime
 * @property integer $TimeSpan
 * @property integer $TimeSpanType
 * @property string $Apiaddress
 * @property string $Applications
 * @property integer $InitOnOrgCreated
 */
class MyscrmErpservicetemplateEntity extends ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_erpservicetemplate';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['ERPServiceTemplateId', 'ServiceName', 'ServiceFriendlyName', 'ServiceCategory'], 'required'],
            [['ServiceCategory', 'TimeSpan', 'TimeSpanType', 'InitOnOrgCreated'], 'integer'],
            [['BeginDatetime'], 'safe'],
            [['ERPServiceTemplateId', 'OperationTypeId', 'AddressId'], 'string', 'max' => 36],
            [['ServiceName', 'ServiceFriendlyName'], 'string', 'max' => 100],
            [['Apiaddress'], 'string', 'max' => 500],
            [['Applications'], 'string', 'max' => 4000]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ERPServiceTemplateId' => 'Erpservice Template ID',
            'ServiceName' => 'Service Name',
            'ServiceFriendlyName' => 'Service Friendly Name',
            'OperationTypeId' => 'Operation Type ID',
            'AddressId' => 'Address ID',
            'ServiceCategory' => 'Service Category',
            'BeginDatetime' => 'Begin Datetime',
            'TimeSpan' => 'Time Span',
            'TimeSpanType' => 'Time Span Type',
            'Apiaddress' => 'Apiaddress',
            'Applications' => 'Applications',
            'InitOnOrgCreated' => 'Init On Org Created',
        ];
    }
}